home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Snippets / Toolbox / Sys7 popUpCDEF / SimplePopupCDEF.r < prev    next >
Encoding:
Text File  |  1992-11-02  |  5.3 KB  |  347 lines  |  [TEXT/MPS ]

  1. #include "Types.r"
  2. resource 'MENU' (128, preload) {
  3.     128,
  4.     textMenuProc,
  5.     0x7FFFFFFD,
  6.     enabled,
  7.     apple,
  8.     {    /* array: 2 elements */
  9.         /* [1] */
  10.         "About", noIcon, noKey, noMark, plain,
  11.         /* [2] */
  12.         "-", noIcon, noKey, noMark, plain
  13.     }
  14. };
  15.  
  16. resource 'MENU' (129, preload) {
  17.     129,
  18.     textMenuProc,
  19.     0xE00,
  20.     enabled,
  21.     "File",
  22.     {    /* array: 10 elements */
  23.         /* [1] */
  24.         "New", noIcon, "N", noMark, plain,
  25.         /* [2] */
  26.         "Open", noIcon, "O", noMark, plain,
  27.         /* [3] */
  28.         "Close", noIcon, "W", noMark, plain,
  29.         /* [4] */
  30.         "Save", noIcon, "S", noMark, plain,
  31.         /* [5] */
  32.         "Save As...", noIcon, noKey, noMark, plain,
  33.         /* [6] */
  34.         "-", noIcon, noKey, noMark, plain,
  35.         /* [7] */
  36.         "Page Setup...", noIcon, noKey, noMark, plain,
  37.         /* [8] */
  38.         "Print...", noIcon, "P", noMark, plain,
  39.         /* [9] */
  40.         "-", noIcon, noKey, noMark, plain,
  41.         /* [10] */
  42.         "Quit", noIcon, "Q", noMark, plain
  43.     }
  44. };
  45.  
  46. resource 'MENU' (130, preload) {
  47.     130,
  48.     textMenuProc,
  49.     0x3400,
  50.     enabled,
  51.     "Edit",
  52.     {    /* array: 6 elements */
  53.         /* [1] */
  54.         "Undo", noIcon, "Z", noMark, plain,
  55.         /* [2] */
  56.         "-", noIcon, noKey, noMark, plain,
  57.         /* [3] */
  58.         "Cut", noIcon, "X", noMark, plain,
  59.         /* [4] */
  60.         "Copy", noIcon, "C", noMark, plain,
  61.         /* [5] */
  62.         "Paste", noIcon, "V", noMark, plain,
  63.         /* [6] */
  64.         "Clear", noIcon, noKey, noMark, plain
  65.     }
  66. };
  67.  
  68. resource 'MENU' (131) {
  69.     131,
  70.     textMenuProc,
  71.     0x7FFFFFD7,
  72.     enabled,
  73.     "Test Stuff",
  74.     {    /* array: 1 elements */
  75.         /* [1] */
  76.         "Add whatever you want", noIcon, noKey, noMark, plain
  77.     }
  78. };
  79.  
  80. resource 'MENU' (132) {
  81.     132,
  82.     textMenuProc,
  83.     allEnabled,
  84.     enabled,
  85.     "Title",
  86.     {    /* array: 2 elements */
  87.         /* [1] */
  88.         "Plain Popup item 1", noIcon, noKey, noMark, plain,
  89.         /* [2] */
  90.         "Plain Popup Item 2", noIcon, noKey, noMark, plain
  91.     }
  92. };
  93.  
  94. resource 'MENU' (133) {
  95.     133,
  96.     textMenuProc,
  97.     allEnabled,
  98.     enabled,
  99.     "Title",
  100.     {    /* array: 2 elements */
  101.         /* [1] */
  102.         "wFont Popup item 1", noIcon, noKey, noMark, plain,
  103.         /* [2] */
  104.         "wFont Popup Item 2", noIcon, noKey, noMark, plain
  105.     }
  106. };
  107.  
  108. /* no items, this will be filled in by AddResMenu */
  109. resource 'MENU' (134) {
  110.     134,
  111.     textMenuProc,
  112.     allEnabled,
  113.     enabled,
  114.     "Title",
  115.     {    /* array: 0 elements */
  116.     }
  117. };
  118.  
  119. resource 'MENU' (135) {
  120.     135,
  121.     textMenuProc,
  122.     allEnabled,
  123.     enabled,
  124.     "Title",
  125.     {    /* array: 2 elements */
  126.         /* [1] */
  127.         "outline Popup item 1", noIcon, noKey, noMark, plain,
  128.         /* [2] */
  129.         "outline Popup Item 2", noIcon, noKey, noMark, plain
  130.     }
  131. };
  132.  
  133.  
  134.  
  135.  
  136. resource 'DITL' (128, purgeable) {
  137.     {    /* array DITLarray: 4 elements */
  138.         /* [1] */
  139.         {164, 115, 184, 185},
  140.         Button {
  141.             enabled,
  142.             "OK"
  143.         },
  144.         /* [2] */
  145.         {5, 10, 43, 290},
  146.         StaticText {
  147.             disabled,
  148.             "The Simplest Shell"
  149.         },
  150.         /* [3] */
  151.         {76, 3, 154, 301},
  152.         StaticText {
  153.             disabled,
  154.             "FredWare from Apple Developer Technical "
  155.             "Support, ADS group.\nCopyright ©  1991 Ap"
  156.             "ple Computer Inc.\nWritten by C.K. Haun ("
  157.             "<TR>)."
  158.         },
  159.         /* [4] */
  160.         {53, 82, 71, 227},
  161.         StaticText {
  162.             disabled,
  163.             "version 1.0d1"
  164.         }
  165.     }
  166. };
  167.  
  168. resource 'DITL' (129, purgeable) {
  169.     {    /* array DITLarray: 2 elements */
  170.         /* [1] */
  171.         {170, 90, 190, 148},
  172.         Button {
  173.             enabled,
  174.             "OK"
  175.         },
  176.         /* [2] */
  177.         {10, 40, 62, 204},
  178.         StaticText {
  179.             disabled,
  180.             "Help information should go here"
  181.         }
  182.     }
  183. };
  184.  
  185. resource 'DITL' (130, purgeable) {
  186.     {    /* array DITLarray: 3 elements */
  187.         /* [1] */
  188.         {80, 100, 100, 158},
  189.         Button {
  190.             enabled,
  191.             "Exit"
  192.         },
  193.         /* [2] */
  194.         {10, 80, 27, 237},
  195.         StaticText {
  196.             disabled,
  197.             "Bad System Version!"
  198.         },
  199.         /* [3] */
  200.         {50, 25, 66, 232},
  201.         StaticText {
  202.             disabled,
  203.             "Requires System 7 or greater."
  204.         }
  205.     }
  206. };
  207.  
  208. resource 'ALRT' (128, purgeable) {
  209.     {40, 40, 229, 363},
  210.     128,
  211.     {    /* array: 4 elements */
  212.         /* [1] */
  213.         OK, visible, sound1,
  214.         /* [2] */
  215.         OK, visible, sound1,
  216.         /* [3] */
  217.         OK, visible, sound1,
  218.         /* [4] */
  219.         OK, visible, sound1
  220.     }
  221. };
  222.  
  223. resource 'ALRT' (130, purgeable) {
  224.     {40, 40, 149, 296},
  225.     130,
  226.     {    /* array: 4 elements */
  227.         /* [1] */
  228.         OK, visible, sound1,
  229.         /* [2] */
  230.         OK, visible, sound1,
  231.         /* [3] */
  232.         OK, visible, sound1,
  233.         /* [4] */
  234.         OK, visible, sound1
  235.     }
  236. };
  237.  
  238. /* These are the popup controls */
  239.  
  240. resource 'CNTL' (128) {
  241.     {41, 42, 70, 231},
  242.     0,
  243.     visible,
  244.     50,
  245.     132, /* menu res ID */
  246.     popupMenuCDEFproc,
  247.     0,
  248.     "plain"
  249. };
  250.  
  251. resource 'CNTL' (129) {
  252.     {91, 42, 120, 331},
  253.     0,
  254.     visible,
  255.     100,
  256.     133, /* menu res ID */
  257.     popupMenuCDEFproc + popupUseWFont,
  258.     0,
  259.     "useWFont"
  260. };
  261.  
  262. resource 'CNTL' (130) {
  263.     {131, 42, 160, 331},
  264.     0,
  265.     visible,
  266.     100,
  267.     134, /* menu res ID */
  268.     popupMenuCDEFproc + popupUseAddResMenu,
  269.     1179602516,
  270.     "addResMenu"
  271. };
  272.  
  273. resource 'CNTL' (131) {
  274.     {171, 42, 190, 331},
  275.     popupTitleOutline,
  276.     visible,
  277.     100,
  278.     135,    /* menu res ID */
  279.     popupMenuCDEFproc,
  280.     0,
  281.     "outline title"
  282. };
  283.  
  284. resource 'MBAR' (128) {
  285.     {    /* array MenuArray: 4 elements */
  286.         /* [1] */
  287.         128,
  288.         /* [2] */
  289.         129,
  290.         /* [3] */
  291.         130,
  292.         /* [4] */
  293.         131
  294.     }
  295. };
  296.  
  297. resource 'WIND' (128, purgeable) {
  298.     {40, 40, 310, 572},
  299.     zoomDocProc,
  300.     visible,
  301.     goAway,
  302.     0x0,
  303.     "Simple"
  304. };
  305.  
  306. resource 'SIZE' (-1) {
  307.     reserved,
  308.     acceptSuspendResumeEvents,
  309.     reserved,
  310.     canBackground,
  311.     multiFinderAware,
  312.     backgroundAndForeground,
  313.     dontGetFrontClicks,
  314.     ignoreChildDiedEvents,
  315.     is32BitCompatible,
  316.     isHighLevelEventAware,
  317.     localAndRemoteHLEvents,
  318.     notStationeryAware,
  319.     dontUseTextEditServices,
  320.     reserved,
  321.     reserved,
  322.     reserved,
  323.     50000,
  324.     50000
  325. };
  326.  
  327. resource 'STR ' (128) {
  328.     "Simple Help..."
  329. };
  330.  
  331. resource 'DLOG' (129, "Sample Help Dialog", purgeable) {
  332.     {34, 40, 234, 280},
  333.     dBoxProc,
  334.     visible,
  335.     goAway,
  336.     0x0,
  337.     129,
  338.     ""
  339. };
  340.  
  341.  
  342.  
  343. resource 'STR#' (128,purgeable){
  344. {
  345. "Last Item Selected->"
  346. }
  347. };